package com.sea.app.module.identity.process;

import com.sea.app.module.identity.process.manager.ProcessGroupEntityManager;
import org.activiti.engine.impl.interceptor.Session;
import org.activiti.engine.impl.interceptor.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by 31417 on 2017/4/29.
 */
@Service
public class GroupEntityManagerFactory implements SessionFactory{
    ProcessGroupEntityManager processGroupEntityManager;
    @Override
    public Class<?> getSessionType() {
        return ProcessGroupEntityManager.class;
    }

    @Override
    public Session openSession() {
        return processGroupEntityManager;
    }
    @Autowired
    public void setProcessGroupEntityManager(ProcessGroupEntityManager processGroupEntityManager) {
        this.processGroupEntityManager = processGroupEntityManager;
    }
}
